feat: add last_active_at ping endpoint#955
Merged
Merged
Conversation
Covers authenticated 200, missing user_id 400, and unauthenticated 403 cases. Seeds the blocks table before users to satisfy the foreign key constraint. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The users table was missing the last_active_at column in the base schema (01_schema.sql), and the test needed to seed the blocks table to satisfy the users.blocknumber foreign key constraint. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
82b12b0 to
c7a34fa
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
POST /v1/users/me/pingendpoint (already merged in feat: add last_active_at column and POST /v1/users/me/ping endpoint #954)blockstable beforeusers(foreign key constraint) and ensureslast_active_atcolumn exists01_schema.sqlto includelast_active_aton theuserstableTest plan
go build ./...passesgo vet ./api/...passesTestPostV1UsersPingpasses locally (all 3 subtests)go test ./api/...passes (except pre-existingTestSearchwhich requires Elasticsearch)🤖 Generated with Claude Code